package com.doeis.core.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ java.lang.annotation.ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
public @interface Transaction {
	public static final int PROPAGATION_REQUIRED = 0;
	public static final int PROPAGATION_NESTED = 1;
	public static final int PROPAGATION_REQUIRES_NEW = 2;
	public static final int LEVEL_READ_UNCOMMITTED = 1;
	public static final int LEVEL_READ_COMMITTED = 2;
	public static final int LEVEL_REPEATABLE_READ = 4;
	public static final int LEVEL_SERIALIZABLE = 8;
	public static final String read = "r";
	public static final String write = "w";

	public abstract int level() default LEVEL_READ_COMMITTED;

	public abstract int propagation();

	public abstract String datasource() default "plat";

	public abstract String rw() default read;
}